<template>
  <div id="TimeOutwarningAbnormal">
    <div>
      <el-table :data="tableData" style="width: 100%" border>
        <el-table-column type="index" width="50" label="序号">
        </el-table-column>
        <el-table-column prop="branch_id_name" label="所属区域" width="120">
        </el-table-column>
        <el-table-column prop="collect_count" label="揽收" width="80">
          <template slot-scope="scope">
            <el-tag
              size="medium"
              type="danger"
              @click="redirect(scope.row.branch_id, scope.row.collect_id)"
              v-if="scope.row.collect_count != ''"
            >
              {{ scope.row.collect_count }}</el-tag
            >
          </template>
        </el-table-column>
        <el-table-column prop="dispatch_count" label="干线" width="80">
          <template slot-scope="scope">
            <el-tag
              size="medium"
              type="danger"
              @click="redirect(scope.row.branch_id, scope.row.dispatch_id)"
              v-if="scope.row.dispatch_count != ''"
            >
              {{ scope.row.dispatch_count }}</el-tag
            >
          </template>
        </el-table-column>
        <el-table-column prop="distribution_count" label="配送" width="80">
          <template slot-scope="scope">
            <el-tag
              size="medium"
              type="danger"
              @click="redirect(scope.row.branch_id, scope.row.distribution_id)"
              v-if="scope.row.distribution_count != ''"
            >
              {{ scope.row.distribution_count }}</el-tag
            >
          </template>
        </el-table-column>
        <el-table-column prop="sign_count" label="签收" width="80">
          <template slot-scope="scope">
            <el-tag
              size="medium"
              type="danger"
              @click="redirect(scope.row.branch_id, scope.row.sign_id)"
              v-if="scope.row.sign_count != ''"
            >
              {{ scope.row.sign_count }}</el-tag
            >
          </template>
        </el-table-column>
        <el-table-column
          prop="receipt_create_count"
          label="回单创建"
          width="80"
        >
          <template slot-scope="scope">
            <el-tag
              size="medium"
              type="danger"
              @click="
                redirect(scope.row.branch_id, scope.row.receipt_create_id)
              "
              v-if="scope.row.receipt_create_count != ''"
            >
              {{ scope.row.receipt_create_count }}</el-tag
            >
          </template>
        </el-table-column>
        <el-table-column prop="receipt_sign_count" label="回单签收" width="80">
          <template slot-scope="scope">
            <el-tag
              size="medium"
              type="danger"
              @click="redirect(scope.row.branch_id, scope.row.receipt_sign_id)"
              v-if="scope.row.receipt_sign_count != ''"
            >
              {{ scope.row.receipt_sign_count }}</el-tag
            >
          </template>
        </el-table-column>
        <el-table-column
          prop="box_recycle_create_count"
          label="回箱创建"
          width="80"
        >
          <template slot-scope="scope">
            <el-tag
              size="medium"
              type="danger"
              @click="
                redirect(scope.row.branch_id, scope.row.box_recycle_create_id)
              "
              v-if="scope.row.box_recycle_create_count != ''"
            >
              {{ scope.row.box_recycle_create_count }}</el-tag
            >
          </template>
        </el-table-column>
        <el-table-column
          prop="box_recycle_sign_count"
          label="回箱签收"
          width="80"
        >
          <template slot-scope="scope">
            <el-tag
              size="medium"
              type="danger"
              @click="
                redirect(scope.row.branch_id, scope.row.box_recycle_sign_id)
              "
              v-if="scope.row.box_recycle_sign_count != ''"
            >
              {{ scope.row.box_recycle_sign_count }}</el-tag
            >
          </template>
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>
<script>
import { overtimerecordsshow } from "@/api/Largewidthmeterlist";
import { getNowFormatDate } from "@/utils/auth";
export default {
  name: "qualityMonitoringAbnormal",
  data() {
    return {
      tableData: [],
    };
  },
  mounted() {
    this.thermometermonitorObj();
  },
  methods: {
    thermometermonitorObj() {
      var newdata = getNowFormatDate();
      var param = {
        create_day: newdata,
      };
      overtimerecordsshow(param).then((res) => {
        // console.log(res, "rewresfsdf");
        this.tableData = res.data;
      });
    },
    redirect(router, node_id) {
      this.$router.push({
        name: "TimeOutwarningList",
        query: {
          branch_id: router,
          node_id: node_id,
        },
      });
    },
  },
};
</script>
<style scoped lang="less">
#TimeOutwarningAbnormal {
  width: 100%;
  background: #ffffff;
  padding: 10px 15px;
}
</style>